package com.lmk.dsa.struct.commons;

/**
 * 二分搜索树的数据节点
 * @author LaoMake
 * @since 1.0
 */
public class BstNode<K extends Comparable<? super K>, V> extends KvNode<K, V>{
    /** 左节点 */
    public BstNode left;

    /** 右节点 */
    public BstNode right;

    /** 高度 */
    public int height;

    public BstNode() {
        height = 1;
    }

    public BstNode(K key, V value) {
        this.key = key;
        this.value = value;
        height = 1;
    }

    public BstNode(KvNode<K, V> node) {
        this.key = node.key;
        this.value = node.value;
        height = 1;
    }
}
